import request from '@/utils/request'

const api = {
    roleList: '/role/list',
    addRole: '/role/add',
    editRole: '/role/edit',
    removeRole: '/role/remove',
    menuActionTree: '/role/tree'
  }

  export function roleList (parameter) {
    return request({
      url: api.roleList,
      method: 'post',
      data: parameter
    })
  }

  export function addRole (parameter) {
    return request({
      url: api.addRole,
      method: 'post',
      data: parameter
    })
  }

  export function editRole (parameter) {
    return request({
      url: api.editRole,
      method: 'post',
      data: parameter
    })
  }

  export function removeRole (parameter) {
    return request({
      url: api.removeRole,
      method: 'post',
      data: parameter
    })
  }

  export function menuActionTree (parameter) {
    return request({
      url: api.menuActionTree,
      method: 'post',
      data: parameter
    })
  }
